<%@ page import="javax.swing.*" %>
<%@ page import="com.hngc.dao.UserDao" %>
<%--
  Created by IntelliJ IDEA.
  User: 悠乐美
  Date: 2024/1/10
  Time: 12:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    int id = Integer.parseInt(request.getParameter("id"));
    UserDao userDao = new UserDao();
    boolean result = userDao.delUser(id);

    if (result) {
        response.sendRedirect("userlist.jsp");
    } else {
        out.print("<script>alert('删除失败，请联系管理员')</script>");
    }
%>
</body>
</html>